<% if vulnerability.is_a? Vulnerability %>
<%= _("Issue created from vulnerability %{vulnerability_link}".html_safe) % { vulnerability_link: link_to(vulnerability.id, vulnerability_url(vulnerability)) } %>

<% end %>
### <%= _("Description") %>:

<%= vulnerability.description %>

<% if vulnerability.severity.present? %>
* <%= _("Severity") %>: <%= vulnerability.severity %>
<% end %>
<% if vulnerability.try(:file) %>
* <%= _("Location") %>: [<%= vulnerability.location_text %>](<%= vulnerability.location_link %>)
<% end %>
<% if vulnerability.try(:evidence_issue_description) %>

<%= vulnerability.evidence_issue_description %>
<% end %>
<% if vulnerability.solution.present? %>

### <%= _("Solution") %>:

<%= vulnerability.solution %>
<% end %>
<% if vulnerability.identifiers.present? %>

### <%= _("Identifiers") %>:

<% vulnerability.identifiers.each do |identifier| %>
<% if identifier[:url].present? %>
* [<%= identifier[:name] %>](<%= identifier[:url] %>)
<% else %>
* <%= identifier[:name] %>
<% end %>
<% end %>
<% end %>
<% if vulnerability.links.present? %>

### <%= _("Links") %>:

<% vulnerability.links.each do |link| %>
<% if link[:name].present? %>
* [<%= link[:name] %>](<%= link[:url] %>)
<% else %>
* <%= link[:url] %>
<% end %>
<% end %>
<% end %>
<% if vulnerability.remediations.present? && vulnerability.remediations.any? %>

### <%= _("Remediations") %>:

<% vulnerability.remediations.each do |remediation| %>
  <details>
  <summary><%= _("Patch to apply") %></summary>

  ```diff
  <%= Base64.decode64(remediation[:diff]) %>
  ```

  </details>
<% end %>
<% end %>
<% if vulnerability_scan_data?(vulnerability) %>

### <%= _("Scanner") %>:

<% if vulnerability.scanner.present? %>
* <%= _("Name") %>: <%= vulnerability.scanner[:name] %>
<% end %>
<%- scan_data = vulnerability.scan -%>
<% if scan_data.present? %>
<% if scan_data[:type].present? %>
* <%= _("Type") %>: <%= scan_data[:type] %>
<% end %>
<% if scan_data[:status].present? %>
* <%= _("Status") %>: <%= scan_data[:status] %>
<% end %>
<% if scan_data[:start_time].present? %>
* <%= _("Start Time") %>: <%= scan_data[:start_time] %>
<% end %>
<% if scan_data[:end_time].present? %>
* <%= _("End Time") %>: <%= scan_data[:end_time] %>
<% end %>
<% end %>
<% end %>

/confidential
